import jsonschema


def asse(resp,status_code, success, code, message):
    assert status_code == resp.status_code
    schema = {"type": "object",
              "required": ["success", "code", "message"],
              "properties": {"success": {"const": success},
                             "code": {"const": code},
                             "message": {"const": message},
                             }}

    jsonschema.validate(instance=resp.json, schema=schema)
